Skip to content

touch and display example for STM32F469I-DISCO B08 board revision (NT35510 LCD controller) #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Amperstrand
Copy link

@Amperstrand Amperstrand commented Jun 22, 2025

NT35510 could possibly be its own create like otm8009a is.

Alternatively it could be part of stm32f4xx-hal in src/nt35510, kind of like there is a module for src/fsmc_lcd

I'm not much of a rust person, and my main goal was just trying to get it to work (which it seems to)

Works and tested on STM32F469I-DISCO B08 board

Resolves stm32-rs#842

Based on STMicroelectronics/STM32CubeH7@1c84713
Now also with touch support.

To see touch inputs, run with

```
cargo run --release --example f469disco-lcd-test --features="stm32f469,defmt"
```

stm32-rs#842
Copy link
Contributor

@tegimeki tegimeki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see support for the newer display, and have some comments on compatibility with the older one. A more modular BSP-level display support approach might resolve these issues, allowing code to first probe the display type with a minimal DSI host config and then initialize for the specific display from there.

Comment on lines +89 to +90
// Try to read RDID1 register - we don't care about the data, just if the command responds
// This matches the C reference behavior: nt35510_read_reg with length 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the OTM8009A display does actually respond to this query, and returns 0x40. To make this example run on a board with that display (the only one I have), it was necessary to check the value... but since I don't have the NT35510 display I can't tell what the expected value actually is. The ST Micro C code looks incorrect though, as it seems to check against 0x00 so maybe the check should be explicit here.

defmt::info!("Initializing LTDC");
let ltdc_freq = 27_429.kHz();
let _display = DisplayController::<u32>::new(
dp.LTDC,
dp.DMA2D,
None,
PixelFormat::ARGB8888,
DISPLAY_CONFIGURATION,
NT35510_DISPLAY_CONFIG, // NT35510 timing works for both controllers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the one board I tested on, it's true that this config works for ORM8009A, but is probably not optimal for that display given the longer sync times v.s. the spec. Since probing can't be done until the DSI interface is up, which requires the timing to already be known, I wonder if a #[cfg] for the display type would be better, even though it's not dynamic (i.e. you would need to target specific hardware v.s. detect at runtime)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants